package com.gxa.service.impl;
import com.github.pagehelper.PageHelper;
import com.gxa.pojo.Userinfo;
import com.gxa.dao.UserinfoMapper;
import com.gxa.service.UserinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserinfoServiceImpl implements UserinfoService {
    @Autowired
    private UserinfoMapper userinfoMapper;


    //@Override
   // public boolean selectUserinfo(Userinfo userinfo) {

    //    return userinfoMapper.selectUserinfo(userinfo)>0;
   // }
    @Override
    public List<Userinfo> selectUserinfo(int pageNum, int pageSize) {

        PageHelper.startPage(pageNum, pageSize);

        List<Userinfo> userinfo = userinfoMapper.selectUserinfo();
        return userinfo;
    }

    @Override
    public boolean insertUserinfo(Userinfo userinfo) {
        return false;
    }

   // @Override
   // public List<Userinfo> query(Userinfo userinfo) {
  //      return null;
  // }

   // @Override
  //  public List<Userinfo> queryByPage(Userinfo userinfo, int page, int size) {
    //    return null;
   // }

    @Override
    public boolean deleteUserinfo(String userinfo_name) {
        return userinfoMapper.deleteUserinfo(userinfo_name)>0;
    }
}
